import { getUserInfoApi } from "../api/user";
import { ref, onMounted } from "vue";

export const useUser = () => {
  const userInfo = ref<IUser>();

  onMounted(() => {
    getUserInfoApi().then((res) => {
      userInfo.value = res.data;
    });
  });

  return {
    userInfo,
  };
};
